package com.landleaf.smarthome;

import com.landleaf.smarthome.device.AttributeTagConst;
import com.landleaf.smarthome.device.AttributeValueConst;
import com.landleaf.smarthome.model.DeviceAttribute;
import com.landleaf.smarthome.model.DeviceModel;
import com.landleaf.smarthome.model.SecurityModel;

import java.util.ArrayList;
import java.util.List;

/**
 * When I wrote this, only God and I understood what I was doing
 * Now, God only knows
 * Created by 海航
 * 2020/9/27
 * 功能描述:
 */
public class MockData {
    public static List<SecurityModel> getSecurityList() {
        List<SecurityModel> securityModels = new ArrayList<>();
        SecurityModel model1 = new SecurityModel();
        model1.setAlarmId(1);
        model1.setAlarmTime(System.currentTimeMillis());
        model1.setAlarmZone(1);
        model1.setAlarmDevice("红外");

        securityModels.add(model1);

        SecurityModel model2 = new SecurityModel();
        model2.setAlarmId(2);
        model2.setAlarmTime(System.currentTimeMillis());
        model2.setAlarmZone(2);
        model2.setAlarmDevice("烟感");

        securityModels.add(model2);
        return securityModels;
    }

    /**
     * 多参数数据
     * @return
     */
    public static DeviceModel getDeviceModel() {
        DeviceModel deviceModel=new DeviceModel();
        deviceModel.setDeviceSn("1");
        deviceModel.setProductCode(8001);
        List<DeviceAttribute> attrs =new ArrayList<>();
        DeviceAttribute model=new DeviceAttribute(AttributeTagConst.SWITCH, AttributeValueConst.CLOSE);
        DeviceAttribute model2=new DeviceAttribute(AttributeTagConst.SYS_MODE, AttributeValueConst.MODE_HOT);
        DeviceAttribute model3=new DeviceAttribute(AttributeTagConst.WIND_SPEED, AttributeValueConst.WIND_1);
        attrs.add(model);
        attrs.add(model2);
        attrs.add(model3);
        deviceModel.setAtts(attrs);
        return deviceModel;
    }
}
